Emanuele Iaccarino personal mark Emanuele Iaccarino personal mark E. Iaccarino
  • home
  • about
  • academic
  • projects
  • publications
  • awards & certifications
  • CV
  • get in touch!
    • LinkedIn
    • email

Snake with Curriculum Learning

Reinforcement Learning
Curriculum Learning
Games

Training an RL agent to play Snake using Stable Baselines3, with curriculum learning to progressively increase difficulty.

Published

October 1, 2024

This project implements a reinforcement learning agent for the classic Snake game using Stable Baselines3.
A curriculum learning strategy is applied: the agent is trained on smaller, simpler boards before progressing to larger and more complex environments.

Methods
- Custom Snake environments in snakeenv.py and snakeenv2.py
- RL training with Proximal Policy Optimization (PPO)
- Curriculum schedule: gradually increasing board size and difficulty
- Logging and monitoring with Stable Baselines3 tools

Key results
- Agent successfully learned to play Snake across multiple board sizes
- Achieved a maximum score of 18 apples eaten in evaluation runs
- Curriculum learning improved convergence speed and stability compared to direct training on large boards

View project on GitHub


Reinforcement learning agent trained with curriculum learning to play Snake

Reinforcement learning agent trained with curriculum learning to master Snake

© 2025 Emanuele Iaccarino

 

This website is built with , , and Quarto